package hc.trip.airticket.bean;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Iterator;
import java.util.List;

public class FlightInfo {

	private int  airCompanyID  = -1; //航空公司
	private String orgCity  = "";   //出发城市
	private String desCity  = "";   //到达城市
	private String flightNo = "";   //航班号
	private String takeOffTime = "";  //起飞时间
	private String arriveTime = "";   //到达时间
	private String flightType = "";   //航班类型
	private String planeType = "";  //机型
	private boolean shareCodeFlag = false; //是否代码共享
	private String shareCode = "";   //代码共享内容
	 //private String flightOtherInfo = "";   //航班其他信息（是否代码共享，是否提供特殊餐食）
    private List prices = null;      //不同舱位不同价格

    private double minprice = 0.0;
    private double maxprice  = 0.0;
    
    private boolean isStopOver = false;     //是否经停  是true 不是false
    private boolean haveSeat = true;   //是否有座位（针对厦门航空，改航空把当日已经过了时间的也显示了出来）
	public boolean isHaveSeat() {
		return haveSeat;
	}
	public void setHaveSeat(boolean haveSeat) {
		this.haveSeat = haveSeat;
	}
	public boolean isStopOver() {
		return isStopOver;
	}
	public void setStopOver(boolean isStopOver) {
		this.isStopOver = isStopOver;
	}
	public double getMinprice() {
		return minprice;
	}
	public void setMinprice(double minprice) {
		this.minprice = minprice;
	}
	public double getMaxprice() {
		return maxprice;
	}
	public void setMaxprice(double maxprice) {
		this.maxprice = maxprice;
	}
	public boolean isShareCodeFlag() {
		return shareCodeFlag;
	}
	public void setShareCodeFlag(boolean shareCodeFlag) {
		this.shareCodeFlag = shareCodeFlag;
	}
	public String getShareCode() {
		return shareCode;
	}
	public void setShareCode(String shareCode) {
		this.shareCode = shareCode;
	}
	public List getPrices() {
		return prices;
	}
	public void setPrice(List prices) throws SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
		this.prices = prices;
		
		if (prices!=null&&prices.size()>0&&prices.get(0)!=null) {
			Iterator it = prices.iterator();
			PriceInfo info = null;
			while (it.hasNext()) {
				 info = (PriceInfo)it.next();
				 Class classType = FlightInfo.class;
				 String namePrice = "set"+info.getSpace().toUpperCase()+"position";
				 String nameRemind = "set"+info.getSpace().toUpperCase()+"remind";
				 Method setPriceMethod = classType.getMethod(namePrice,double.class);
				 Method setReminMethod = classType.getMethod(nameRemind, String.class);
				 setPriceMethod.invoke(this, info.getPrice());
				 setReminMethod.invoke(this, info.getRemind());
			}
		}
 
	}
	public int getAirCompanyID() {
		return airCompanyID;
	}
	public void setAirCompanyID(int airCompanyID) {
		this.airCompanyID = airCompanyID;
	}
	public String getPlaneType() {
		return planeType;
	}
	public void setPlaneType(String planeType) {
		this.planeType = planeType;
	}

	public String getOrgCity() {
		return orgCity;
	}
	public void setOrgCity(String orgCity) {
		this.orgCity = orgCity;
	}
	public String getDesCity() {
		return desCity;
	}
	public void setDesCity(String desCity) {
		this.desCity = desCity;
	}
	public String getFlightNo() {
		return flightNo;
	}
	public void setFlightNo(String flightNo) {
		this.flightNo = flightNo;
	}
	public String getTakeOffTime() {
		return takeOffTime;
	}
	public void setTakeOffTime(String takeOffTime) {
		this.takeOffTime = takeOffTime;
	}
	public String getArriveTime() {
		return arriveTime;
	}
	public void setArriveTime(String arriveTime) {
		this.arriveTime = arriveTime;
	}
	public String getFlightType() {
		return flightType;
	}
	public void setFlightType(String flightType) {
		this.flightType = flightType;
	}

	//------------------------------------------------------------------------------------------
	private double aposition = 0.00;public void setAposition(double temp) {this.aposition = temp;}public double getAposition() {return aposition;}
	private double bposition = 0.00;public void setBposition(double temp) {this.bposition = temp;}public double getBposition() {return bposition;}
	private double cposition = 0.00;public void setCposition(double temp) {this.cposition = temp;}public double getCposition() {return cposition;}
	private double dposition = 0.00;public void setDposition(double temp) {this.dposition = temp;}public double getDposition() {return dposition;}
	private double eposition = 0.00;public void setEposition(double temp) {this.eposition = temp;}public double getEposition() {return eposition;}
	private double fposition = 0.00;public void setFposition(double temp) {this.fposition = temp;}public double getFposition() {return fposition;}
	private double gposition = 0.00;public void setGposition(double temp) {this.gposition = temp;}public double getGposition() {return gposition;}
	private double hposition = 0.00;public void setHposition(double temp) {this.hposition = temp;}public double getHposition() {return hposition;}
	private double iposition = 0.00;public void setIposition(double temp) {this.iposition = temp;}public double getIposition() {return iposition;}
	private double jposition = 0.00;public void setJposition(double temp) {this.jposition = temp;}public double getJposition() {return jposition;}
	private double kposition = 0.00;public void setKposition(double temp) {this.kposition = temp;}public double getKposition() {return kposition;}
	private double lposition = 0.00;public void setLposition(double temp) {this.lposition = temp;}public double getLposition() {return lposition;}
	private double mposition = 0.00;public void setMposition(double temp) {this.mposition = temp;}public double getMposition() {return mposition;}
	private double nposition = 0.00;public void setNposition(double temp) {this.nposition = temp;}public double getNposition() {return nposition;}
	private double oposition = 0.00;public void setOposition(double temp) {this.oposition = temp;}public double getOposition() {return oposition;}
	private double pposition = 0.00;public void setPposition(double temp) {this.pposition = temp;}public double getPposition() {return pposition;}
	private double qposition = 0.00;public void setQposition(double temp) {this.qposition = temp;}public double getQposition() {return qposition;}
	private double rposition = 0.00;public void setRposition(double temp) {this.rposition = temp;}public double getRposition() {return rposition;}
	private double sposition = 0.00;public void setSposition(double temp) {this.sposition = temp;}public double getSposition() {return sposition;}
	private double tposition = 0.00;public void setTposition(double temp) {this.tposition = temp;}public double getTposition() {return tposition;}
	private double uposition = 0.00;public void setUposition(double temp) {this.uposition = temp;}public double getUposition() {return uposition;}
	private double vposition = 0.00;public void setVposition(double temp) {this.vposition = temp;}public double getVposition() {return vposition;}
	private double wposition = 0.00;public void setWposition(double temp) {this.wposition = temp;}public double getWposition() {return wposition;}
	private double xposition = 0.00;public void setXposition(double temp) {this.xposition = temp;}public double getXposition() {return xposition;}
	private double yposition = 0.00;public void setYposition(double temp) {this.yposition = temp;}public double getYposition() {return yposition;}
	private double zposition = 0.00;public void setZposition(double temp) {this.zposition = temp;}public double getZposition() {return zposition;}
	
	//-------------------------------------------------------------------------------------------
	private String aremind = null;public void setAremind(String temp) {this.aremind = temp;}public String getAremind() {return aremind; }
	private String bremind = null;public void setBremind(String temp) {this.bremind = temp;}public String getBremind() {return bremind; }
	private String cremind = null;public void setCremind(String temp) {this.cremind = temp;}public String getCremind() {return cremind; }
	private String dremind = null;public void setDremind(String temp) {this.dremind = temp;}public String getDremind() {return dremind; }
	private String eremind = null;public void setEremind(String temp) {this.eremind = temp;}public String getEremind() {return eremind; }
	private String fremind = null;public void setFremind(String temp) {this.fremind = temp;}public String getFremind() {return fremind; }
	private String gremind = null;public void setGremind(String temp) {this.gremind = temp;}public String getGremind() {return gremind; }
	private String hremind = null;public void setHremind(String temp) {this.hremind = temp;}public String getHremind() {return hremind; }
	private String iremind = null;public void setIremind(String temp) {this.iremind = temp;}public String getIremind() {return iremind; }
	private String jremind = null;public void setJremind(String temp) {this.jremind = temp;}public String getJremind() {return jremind; }
	private String kremind = null;public void setKremind(String temp) {this.kremind = temp;}public String getKremind() {return kremind; }
	private String lremind = null;public void setLremind(String temp) {this.lremind = temp;}public String getLremind() {return lremind; }
	private String mremind = null;public void setMremind(String temp) {this.mremind = temp;}public String getMremind() {return mremind; }
	private String nremind = null;public void setNremind(String temp) {this.nremind = temp;}public String getNremind() {return nremind; }
	private String oremind = null;public void setOremind(String temp) {this.oremind = temp;}public String getOremind() {return oremind; }
	private String premind = null;public void setPremind(String temp) {this.premind = temp;}public String getPremind() {return premind; }
	private String qremind = null;public void setQremind(String temp) {this.qremind = temp;}public String getQremind() {return qremind; }
	private String rremind = null;public void setRremind(String temp) {this.rremind = temp;}public String getRremind() {return rremind; }
	private String sremind = null;public void setSremind(String temp) {this.sremind = temp;}public String getSremind() {return sremind; }
	private String tremind = null;public void setTremind(String temp) {this.tremind = temp;}public String getTremind() {return tremind; }
	private String uremind = null;public void setUremind(String temp) {this.uremind = temp;}public String getUremind() {return uremind; }
	private String vremind = null;public void setVremind(String temp) {this.vremind = temp;}public String getVremind() {return vremind; }
	private String wremind = null;public void setWremind(String temp) {this.wremind = temp;}public String getWremind() {return wremind; }
	private String xremind = null;public void setXremind(String temp) {this.xremind = temp;}public String getXremind() {return xremind; }
	private String yremind = null;public void setYremind(String temp) {this.yremind = temp;}public String getYremind() {return yremind; }
	private String zremind = null;public void setZremind(String temp) {this.zremind = temp;}public String getZremind() {return zremind; }

}
